package com.taotao.manager.feign;


import com.taotao.common.dto.TbContent;
import com.taotao.common.pojo.EasyUITreeNode;
import com.taotao.common.pojo.TaotaoResult;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * Created by zhang_xming on 2017/2/13.
 */
@FeignClient(name = "taotao-content")
public interface ContentFeignClient {
    @RequestMapping(value = "/content/category/list", method = RequestMethod.GET)
    public List<EasyUITreeNode> getContentCategoryList(
            @RequestParam(value="id", defaultValue="0")Long parentId);

    @RequestMapping(value = "/content/save", method = RequestMethod.POST)
    public TaotaoResult addContent(@RequestBody TbContent content);

    @RequestMapping(value = "/content/category/create", method = RequestMethod.POST)
    public TaotaoResult addContentCategory(@PathVariable("parentId") Long parentId,@PathVariable("name") String name);

    @RequestMapping(value = "/content/category/list/{categoryId}", method = RequestMethod.GET)
    public List<TbContent> getContentByCid(@PathVariable("categoryId") long cid);
}
